/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package WebCrawlerBD.sqlmapdao;

import WebCrawlerBD.interfaces.TerminoDao;
import WebCrawlerBE.Termino;
import WebCrawlerBE.Terminoxpagina;
import com.ibatis.dao.client.DaoManager;
import java.util.List;

/**
 *
 * @author externo.drisco
 */
public class TerminoSqlMapDao extends BaseSqlMapDao implements TerminoDao{

    public TerminoSqlMapDao(DaoManager daoManager) {
        super(daoManager);
    }

    @Override
    public void actualizaTermino(Terminoxpagina t){
        update("updateTermino",t);
    }

    @Override
    public List<Terminoxpagina> contarTermino(Terminoxpagina t){
        return (List<Terminoxpagina>)queryForList("getListTerminoxpagina",t.getTermino().getTermino());
    }

    @Override
    public void insertarTermino(Termino t){
        insert("insertTermino",t);
    }

    @Override
    public void insertarTerminoxPagina(List<Terminoxpagina> arrTerm){

        for(Terminoxpagina t :arrTerm){
            insert("insertTerminoxPagina",t);
        }

    }
}
